package facade.chartSys;
// Facade 外观
public class Facade {
    DataRead dataRead;
    DataDecode dataDecode;
    Visualize visualize;

    public void deal() {
        if (dataRead == null)
            dataRead = new DataRead();
        String data = dataRead.readData("C:/data");
        if (dataDecode == null)
            dataDecode = new DataDecode();
        String decode = dataDecode.decode(data);
        if (visualize == null)
            visualize = new Visualize();
        visualize.showChart(decode);
    }

    public DataRead getDataRead() {
        return dataRead;
    }

    public void setDataRead(DataRead dataRead) {
        this.dataRead = dataRead;
    }

    public DataDecode getDataDecode() {
        return dataDecode;
    }

    public void setDataDecode(DataDecode dataDecode) {
        this.dataDecode = dataDecode;
    }

    public Visualize getVisualize() {
        return visualize;
    }

    public void setVisualize(Visualize visualize) {
        this.visualize = visualize;
    }
}
